/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const fundsManagementRouter = {
  path: '/fundsManagement',
  component: Layout,
  redirect: '/fundsManagement/subcontractor',
  name: 'FundsManagement',
  meta: {
    title: '工程款管理',
    icon: 'fundsManagement',
    roles: ['projectCost']
  },
  children: [
    {
      path: 'subcontractor',
      name: 'Subcontractor',
      component: () => import('@/views/fundsManagement/subcontractor'),
      meta: {
        title: '分包商管理',
        // icon: 'subcontractor',
        // activeMenu: 'subcontractor',
        roles: ['subcontractor:get']
      }
    },
    {
      path: 'createSubcontractor',
      name: 'CreateSubcontractor',
      hidden: true,
      component: () => import('@/views/fundsManagement/create'),
      meta: {
        title: '创建分包商',
        // activeMenu: 'subcontractor',
        parentRouter: {
          path: 'subcontractor',
          meta: {
            title: '分包商管理'
          }
        }
      }
    },
    {
      path: 'edgeSubcontractor',
      name: 'EdgeSubcontractor',
      hidden: true,
      component: () => import('@/views/fundsManagement/edge'),
      meta: {
        title: '编辑分包商',
        // icon: 'subcontractor',
        activeMenu: 'subcontractor',
        parentRouter: {
          path: 'subcontractor',
          meta: {
            title: '分包商管理'
          }
        }
      }
    },
    {
      path: 'detailSubcontractor',
      name: 'DetailSubcontractor',
      hidden: true,
      component: () => import('@/views/fundsManagement/detail'),
      meta: {
        title: '分包商详情',
        // icon: 'subcontractor',
        activeMenu: 'subcontractor',
        parentRouter: {
          path: 'subcontractor',
          meta: {
            title: '分包商管理'
          }
        }
      }
    },
    {
      path: 'pay',
      name: 'Pay',
      component: () => import('@/views/pay/index'),
      meta: {
        title: '付款管理',
        // icon: 'pay',
        // activeMenu: 'pay',
        roles: ['payment:get']
      }
    },
    {
      path: 'createPay',
      name: 'CreatePay',
      hidden: true,
      component: () => import('@/views/pay/create'),
      meta: {
        activeMenu: 'pay',
        title: '创建付款记录',
        parentRouter: {
          path: 'pay',
          meta: {
            title: '付款管理'
          }
        }
      }
    },
    {
      path: 'detailPay',
      name: 'DetailPay',
      hidden: true,
      component: () => import('@/views/pay/detail'),
      meta: {
        activeMenu: 'pay',
        title: '付款记录详情',
        parentRouter: {
          path: 'pay',
          meta: {
            title: '付款管理'
          }
        }
      }
    },
    {
      path: 'momeyManager',
      name: 'momeyManager',
      component: () => import('@/views/momeyManager/index'),
      meta: {
        title: '收支款管理'
      }
    },
    {
      path: 'contractList',
      name: 'ContractList',
      hidden: true,
      component: () => import('@/views/momeyManager/contrac/index'),
      meta: {
        activeMenu: 'momeyManager',
        title: '合同管理',
        parentRouter: {
          path: 'momeyManager',
          meta: {
            title: '收支款管理'
          }
        }
      }
    },
    {
      path: 'materialManager',
      name: 'MaterialManager',
      component: () => import('@/views/momeyManager/material/index'),
      meta: {
        title: '材料管理'
      }
    },
    {
      path: 'materialPlay',
      name: 'MaterialPlay',
      hidden: true,
      component: () => import('@/views/momeyManager/material/materialPlay/index'),
      meta: {
        activeMenu: 'materialManager',
        title: '采购计划管理',
        parentRouter: {
          path: 'materialManager',
          meta: {
            title: '材料管理'
          }
        }
      }
    },
    {
      path: 'materialPlayCreate',
      name: 'MaterialPlayCreate',
      hidden: true,
      component: () => import('@/views/momeyManager/material/materialPlay/create'),
      meta: {
        path: 'materialPlay',
        activeMenu: 'materialManager',
        title: '采购计划管理',
        parentRouter: {
          path: 'materialManager',
          meta: {
            title: '材料管理'
          }
        },
        parentRouter2: {
          path: 'materialPlayCreate',
          meta: {
            title: '新增'
          }
        }
      }
    },
    {
      path: 'materialPlayDetail',
      name: 'MaterialPlayDetail',
      hidden: true,
      component: () => import('@/views/momeyManager/material/materialPlay/detail'),
      meta: {
        path: 'materialPlay',
        activeMenu: 'materialManager',
        title: '采购计划管理',
        parentRouter: {
          path: 'materialManager',
          meta: {
            title: '材料管理'
          }
        },
        parentRouter2: {
          path: 'materialPlayDetail',
          meta: {
            title: '详情'
          }
        }
      }
    },
    {
      path: 'materialInfo',
      name: 'MaterialInfo',
      hidden: true,
      component: () => import('@/views/momeyManager/material/materialInfo/index'),
      meta: {
        activeMenu: 'materialManager',
        title: '采购信息管理',
        parentRouter: {
          path: 'materialManager',
          meta: {
            title: '材料管理'
          }
        }
      }
    },
    {
      path: 'materialInfoCreate',
      name: 'MaterialInfoCreate',
      hidden: true,
      component: () => import('@/views/momeyManager/material/materialInfo/create'),
      meta: {
        path: 'materialInfo',
        activeMenu: 'materialManager',
        title: '采购信息管理',
        parentRouter: {
          path: 'materialManager',
          meta: {
            title: '材料管理'
          }
        },
        parentRouter2: {
          path: 'materialInfoCreate',
          meta: {
            title: '新增'
          }
        }
      }
    },
    {
      path: 'materialInfoDetail',
      name: 'MaterialInfoDetail',
      hidden: true,
      component: () => import('@/views/momeyManager/material/materialInfo/detail'),
      meta: {
        path: 'materialInfo',
        activeMenu: 'materialManager',
        title: '采购信息管理',
        parentRouter: {
          path: 'materialManager',
          meta: {
            title: '材料管理'
          }
        },
        parentRouter2: {
          path: 'materialInfoDetail',
          meta: {
            title: '详情'
          }
        }
      }
    },
    {
      path: 'materiaLdepot',
      name: ' MateriaLdepot',
      hidden: true,
      component: () => import('@/views/momeyManager/material/materiaLdepot/index'),
      meta: {
        activeMenu: 'materialManager',
        title: '仓库管理',
        parentRouter: {
          path: 'materialManager',
          meta: {
            title: '仓库管理'
          }
        }
      }
    },
    {
      path: 'materialJunk',
      name: ' MaterialJunk',
      hidden: true,
      component: () => import('@/views/momeyManager/material/materialJunk/index'),
      meta: {
        activeMenu: 'materialManager',
        title: '残料处理管理',
        parentRouter: {
          path: 'materialManager',
          meta: {
            title: '残料处理管理'
          }
        }
      }
    }
  ]
}

export default fundsManagementRouter
